<%@ page import="Bean.LoginBean" %>
<%@ page import="Dao.Impl.StuDaoImpl" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>

<head>
    <title>河南工业大学</title>
    <link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css">

</head>

<body style=" background-image: url(image/3.jpg); background-size: cover; background-attachment: fixed ">
<script src="//unpkg.com/layui@2.6.8/dist/layui.js"></script>


<script>
    layui.use('element', function(){
        var element = layui.element;
    });
</script>


<%
    request.setCharacterEncoding("utf-8");

    String uzhanghao=(String) request.getAttribute("uzhanghao");
    String umima=(String) request.getAttribute("umima");

    String Msg=(String) request.getAttribute("Msg");
    if(Msg==null)
        Msg="";

    LoginBean u=new LoginBean();
    u.setId(uzhanghao);
    u.setPassword(umima);
    StuDaoImpl stu=new StuDaoImpl();
%>


<div style="width: 1250px;height: 900px;margin: 40px auto 0;border-radius: 5px;box-shadow: 0 0 5px rgba(0,0,0,.5);overflow: hidden;backdrop-filter: blur(30px)">

    <form class="layui-form" action="CardServlet" method="post">
        <div style="width: 1000px;height: 800px;margin: 50px auto;border-radius: 5px;box-shadow: 0 0 5px rgba(0,0,0,.5);background-color:white;overflow: hidden; overflow-y:scroll" >
            <div style="font-size: 25px; margin:30px auto 0px auto; border:1px white solid;width: 200px;height: 30px;font-weight: bold">
                Java Web 考试
            </div>

            <div style="margin: 40px auto 0; width: 350px;font-size: 15px;font-weight: bold; word-spacing:151px">
                姓名: 学号：
            </div>

            <div style="margin: 5px auto; width: 350px;font-size: 15px">
                <input type="text" name="name" value="<%=stu.Login(u).getName()%>" placeholder="请输入姓名" style="height:40px; font-size: 15px;width: 160px;border: 1px solid whitesmoke;background-color: gainsboro;margin: 0 25.5px 0 0"  >
                <input type="text" name="id" value="<%=stu.Login(u).getId()%>" placeholder="请输入学号" style="height:40px; font-size: 15px;width: 160px;border: 1px solid whitesmoke;background-color: gainsboro"  >
                <input type="hidden" name="password" value="<%=umima%>" >
            </div>

            <div style="margin: 40px 100px 0; width: 750px;height: 2px;font-size: 15px;font-weight: bold;background-color: gainsboro"></div>

            <div style="margin: 20px 100px 0; width: 600px;font-size: 15px;font-weight: bold">
                1.【判断题】2022年河南工业大学软件工程专业在人工智能能与大学数据学院
            </div>

            <div style="margin: 30px 100px; width: 350px;height: 20px;font-size: 15px;font-weight:550">
                <input type="radio" name="1" value="yes" title="正确" >
                <input type="radio" name="1" value="no" title="错误">
            </div>

            <div style="margin: 70px 100px 0; width: 750px;height: 2px;font-size: 15px;font-weight: bold;background-color: gainsboro"></div>

            <div style="margin: 20px 100px 0; width: 600px;font-size: 15px;font-weight: bold">
                2.【判断题】2022年河南工业大学计算机科学与技术专业在人工智能能与大学数据学院
            </div>

            <div style="margin: 30px 100px; width: 350px;height: 20px;font-size: 15px;font-weight:550">
                <input type="radio" name="2" value="yes" title="正确" >
                <input type="radio" name="2" value="no" title="错误">
            </div>

            <div style="margin: 70px 100px 0; width: 750px;height: 2px;font-size: 15px;font-weight: bold;background-color: gainsboro"></div>

            <div style="margin: 20px 100px 0; width: 600px;font-size: 15px;font-weight: bold">
                3.【单选题】请问一加一等于多少
            </div>

            <div style="margin: 30px 100px; width: 350px;height: 122px;font-size: 15px;font-weight:550">
                <input type="radio" name="3" value="a" title="A. 2" ><br/>
                <input type="radio" name="3" value="b" title="B. 3"><br/>
                <input type="radio" name="3" value="c" title="C. 4" ><br/>
                <input type="radio" name="3" value="d" title="D. 5">
            </div>

            <div style="margin: 70px 100px 0; width: 750px;height: 2px;font-size: 15px;font-weight: bold;background-color: gainsboro"></div>

            <div style="margin: 20px 100px 0; width: 600px;font-size: 15px;font-weight: bold">
                4.【单选题】请问二加二等于多少
            </div>

            <div style="margin: 30px 100px; width: 350px;height: 122px;font-size: 15px;font-weight:550">
                <input type="radio" name="4" value="1" title="A. 2" ><br/>
                <input type="radio" name="4" value="b" title="B. 3"><br/>
                <input type="radio" name="4" value="c" title="C. 4" ><br/>
                <input type="radio" name="4" value="d" title="D. 5">
            </div>

            <div style="margin: 70px 100px 0; width: 750px;height: 2px;font-size: 15px;font-weight: bold;background-color: gainsboro"></div>

            <div style="margin: 20px 100px 0; width: 600px;font-size: 15px;font-weight: bold">
                5.【多选题】请问一加一和二加二分别等于多少
            </div>

            <div style="margin: 30px 100px; width: 350px;height: 35px;font-size: 15px;font-weight:550">
                <input type="checkbox" name="5" value="1" title="A. 2" lay-skin="primary"><br/>
                <input type="checkbox" name="5" value="2" title="B. 3" lay-skin="primary"><br/>
                <input type="checkbox" name="5" value="3" title="C. 4" lay-skin="primary"><br/>
                <input type="checkbox" name="5" value="4" title="D. 5" lay-skin="primary">
            </div>

            <div style="margin: 150px 100px 0; width: 750px;height: 2px;font-size: 15px;font-weight: bold;background-color: gainsboro"></div>

            <div style="margin: 20px 100px 0; width: 600px;font-size: 15px;font-weight: bold">
                6.【多选题】请问三加三和四加四分别等于多少
            </div>

            <div style="margin: 30px 100px; width: 350px;height: 35px;font-size: 15px;font-weight:550">
                <input type="checkbox" name="6" value="1" title="A. 5" lay-skin="primary"><br/>
                <input type="checkbox" name="6" value="2" title="B. 6" lay-skin="primary"><br/>
                <input type="checkbox" name="6" value="3" title="C. 7" lay-skin="primary"><br/>
                <input type="checkbox" name="6" value="4" title="D. 8" lay-skin="primary">
            </div>

            <div style="margin: 150px 100px 0; width: 750px;height: 2px;font-size: 15px;font-weight: bold;background-color: gainsboro"></div>

            <div style="margin: 20px 100px 0; width: 600px;font-size: 15px;font-weight: bold">
                7.【填空题】请问二乘三等于多少
            </div>

            <div style="margin: 30px 100px; width: 350px;height: 20px;font-size: 15px;font-weight:550">
                <input type="text" name="7" style="height:40px; font-size: 15px;width: 350px;border: 1px solid whitesmoke;background-color: gainsboro;font-weight: 500"  >
            </div>

            <div style="margin: 70px 100px 0; width: 750px;height: 2px;font-size: 15px;font-weight: bold;background-color: gainsboro"></div>

            <div style="margin: 20px 100px 0; width: 600px;font-size: 15px;font-weight: bold">
                8.【填空题】请问四乘五等于多少
            </div>

            <div style="margin: 30px 100px; width: 350px;height: 20px;font-size: 15px;font-weight:550">
                <input type="text" name="8" style="height:40px; font-size: 15px;width: 350px;border: 1px solid whitesmoke;background-color: gainsboro;font-weight: 500"  >
            </div>

            <div style="margin: 80px auto; width: 350px;height: 44px;background-color: white">
                <input type="hidden" id="courses" name="courses" value=""/>
                <input type="hidden" id="courses2" name="courses2" value=""/>
                <button type="submit" class="layui-btn layui-btn-lg " style="background-color: #5FB878;width: 168px">提交</button>
                <button type="reset" class="layui-btn layui-btn-lg " style="background-color: grey;width: 168px" >重置</button>
            </div>

        </div>
    </form>

    <script>
        function send(){
            var obj=document.getElementsByName("5")
            var list=new Array();
            for(var i=0;i<obj.length;i++){
                if(obj[i].checked){
                    list.push(obj[i].value);
                }
            }
            var obj2=document.getElementsByName("6")
            var list2=new Array();
            for(var i=0;i<obj.length;i++){
                if(obj2[i].checked){
                    list2.push(obj2[i].value);
                }
            }
            document.getElementById("courses").value = list;
            document.getElementById("courses2").value = list2;
            document.getElementById("form1").submit();
        }
    </script>

    <%= Msg %>

</div>

</body>

</html>